<!--
 * @文件路径         : \2305\chapter05\week3\2.2组件嵌套.html
 * @作者名称         : error: git config user.name & please set dead value or install git
 * @文件版本         : V1.0.0
 * @创建日期         : 2025-03-03 09:49:11
 * @简要说明         : 
 * 
 * 版权信息         : 2025 by ${git_name}, All Rights Reserved.
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>组件嵌套</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="app">
        <parent-component></parent-component>
    </div>

    <script type="text/javascript">
        Vue.component('parent-component', {
            components: {
                'child-component': {
                    template: '<div><p>子组件</p><input type="color" /></div>'
                }
            },

            template: '<div><child-component></child-component></div>'
        });

        var app = new Vue({
            el: '#app',
            data: {

            }
        });
    </script>
</body>
</html>